i=0
while i<3:
    password = input("请输入密码")
    name=input("请输入名字")
    if name=='杨淦' and password=='123456':
        break
    else:
        if i<2:
         print("输入错误，还有",2-i,"次机会")
    i+=1
else:
    print("结束")